package com.livew.framework.enums;

public enum EUserRoleType {
	
	superAdmin("1","超级管理员"),
	
	message("4","管理员"),
	
	user("6","用户");
	
	private String code;
	
	private String desc;
	
	private EUserRoleType(String code,String desc) {
		this.setCode(code);
		this.setDesc(desc);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	
	public static String getDesc(String code) {
		for (EUserRoleType e : EUserRoleType.values()) {
			if (e.getCode().equals(code)) {
				return e.desc;
			}
		}
		return null;
	}
}
